<?php

class SlideAction extends PublicAction
{
    function index()
    {
        //id
        $id = I('id', 0, 'intval');

        if (!empty($id)) {
            $condition = array();
            $condition['status'] = 1;
            $condition['lang'] = LANG_ID;
            $condition['fid'] = $id;

            $list = M('SlideData')->where($condition)->select();

            $data = array();
            $data['code'] = 200;
            $data['message'] = 'success';
            $data['data'] = $list;

            $this->ajaxReturn($data);
        } else {
            $data['code'] = 200;
            $data['message'] = 'error';
            $this->ajaxReturn($data);
        }
    }
}